cmake_minimum_required(VERSION 3.15)
project(test_package CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

find_package(MagnumIntegration REQUIRED)
set(CMAKE_CXX_STANDARD 11)

add_executable(${PROJECT_NAME} test_package.cpp)
if(WITH_BULLET)
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::Bullet)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_BULLET)
endif()
if(WITH_DART)
    message(FATAL_ERROR "Please, add test with DART")
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::Dart)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_DART)
endif()
if(WITH_EIGEN)
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::Eigen)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_EIGEN)
endif()
if(WITH_GLM)
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::Glm)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_GLM)
endif()
if(WITH_IMGUI)
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::ImGui)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_IMGUI)
endif()
if(WITH_OVR)
    message(FATAL_ERROR "Please, add test with OVR")
    target_link_libraries(${PROJECT_NAME} PRIVATE MagnumIntegration::Ovr)
    target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_OVR)
endif()
